package com.slorgs.business.service

import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.baomidou.mybatisplus.extension.service.IService
import com.slorgs.infrastructure.dto.*
import com.slorgs.infrastructure.model.Api
import org.springframework.web.multipart.MultipartFile
import java.io.IOException
import javax.servlet.http.HttpServletRequest

interface ApiService : IService<Api> {


    fun selectList(page: Page<*>?, api: Api?): ResponseDTO?

    fun groupList(): ResponseDTO?

    fun apiList(api: ApiGroupDTO?, page: Page<*>?, request: HttpServletRequest?): ResponseDTO?

    fun addOrDelete(api: Api?): ResponseDTO?

    fun addApi(api: com.gateway.common.model.Api?): ResponseDTO?

    fun refreshCache(id: String?): ResponseDTO?

    fun deleteApi(id: String?): ResponseDTO?

    fun pcmToPcmA(file: MultipartFile?, apiDTO: PcmApiDTO?): ResponseDTO?

    fun picZip(file: MultipartFile?): ResponseDTO?

    fun envList(): ResponseDTO?

    fun auditLog(page: Page<*>?, loggerDTO: LinkLoggerDTO?): ResponseDTO?

    fun checkApiPath(path: String?): ResponseDTO?

    fun onlineEnv(apiEnvDTO: ApiEnvDTO?): ResponseDTO?

    fun statistics(): ResponseDTO?

    @Throws(IOException::class)
    fun saveLog(): ResponseDTO?
}